package com.issac.mmall.controller;


import com.issac.mmall.service.UserAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Issac
 * @since 2020-12-10
 */
@Controller
@RequestMapping("/userAddress")
public class UserAddressController {

    @Autowired
    UserAddressService userAddressService;

    @GetMapping("/removeAddress/{id}")
    public String removeAddress(@PathVariable("id") Integer id){
        userAddressService.removeById(id);
        return "redirect:/user/userAddressList";
    }

}

